﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmRegistrarProveedor.aspx.cs" Inherits="Farmacia.net.Compras.Proveedor.frmRegistrarProveedor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style3
        {
            width: 115px;
            height: 106px;
        }
        .style4
        {
            text-align: right;
        }
        .style5
        {
            width: 88px;
            height: 86px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Registrar Proveedor</h2>

<fieldset>
   <legend>Datos Proveedor</legend>
    <asp:FormView ID="FormView1" runat="server" BackColor="White" 
        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
        DataSourceID="odsProveedor" GridLines="Both" DefaultMode="Insert">
        <EditItemTemplate>
            <table class="style1">
                <tr>
                    <td rowspan="9" width="120">
                        <img alt="Formulario" class="style3" 
                src="../../Images/1340872915_Application.png" />
                    </td>
                    <td>
                        Id :</td>
                    <td width="120">
                        <asp:TextBox ID="IdProveedorTextBox" runat="server" 
                            Text='<%# Bind("IdProveedor") %>' Width="120px" />
                    </td>
                    <td>
                        &nbsp;</td>
                    <td class="style4" width="120">
                        Ruc :</td>
                    <td colspan="2">
                        <asp:TextBox ID="RucTextBox" runat="server" Text='<%# Bind("Ruc") %>' 
                            Width="120px" />
                    </td>
                    <td colspan="2" rowspan="6">
                        <img alt="Proveedor" class="style5" 
                src="../../Images/1341126967_LorryGreen.png" />
                    </td>
                </tr>
                <tr>
                    <td colspan="6">
                        RazonSocial:</td>
                </tr>
                <tr>
                    <td colspan="6">
                        <asp:TextBox ID="RazonSocialTextBox" runat="server" 
                            Text='<%# Bind("RazonSocial") %>' Width="400px" />
                    </td>
                </tr>
                <tr>
                    <td colspan="6">
                        Direccion:</td>
                </tr>
                <tr>
                    <td colspan="6">
                        <asp:TextBox ID="DireccionTextBox" runat="server" 
                            Text='<%# Bind("Direccion") %>' Width="400px" />
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        Telefono:</td>
                    <td width="120">
                        <asp:TextBox ID="TelefonoTextBox" runat="server" Text='<%# Bind("Telefono") %>' 
                            Width="120px" />
                    </td>
                    <td colspan="2" style="text-align: right">
                        Contacto:</td>
                    <td colspan="2">
                        <asp:TextBox ID="PersonaContactoTextBox" runat="server" 
                            Text='<%# Bind("PersonaContacto") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        Ciudad:</td>
                    <td width="120">
                        <asp:TextBox ID="CiudadTextBox" runat="server" Text='<%# Bind("Ciudad") %>' />
                    </td>
                    <td>
                        &nbsp;</td>
                    <td style="text-align: right" width="120">
                        Email:</td>
                    <td colspan="2">
                        <asp:TextBox ID="EmailTextBox" runat="server" Text='<%# Bind("Email") %>' />
                    </td>
                    <td rowspan="3" style="text-align: center">
                        <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Update" 
                            ImageUrl="~/Images/1340873474_Save.png" 
                            PostBackUrl="~/Compras/Proveedor/frmBuscarProveedor.aspx" 
                            CausesValidation="False" />
                    </td>
                    <td rowspan="3">
                        <asp:ImageButton ID="ImageButton2" runat="server" 
                            ImageUrl="~/Images/1340873477_Delete.png" 
                            PostBackUrl="~/Compras/Proveedor/frmBuscarProveedor.aspx" 
                            CausesValidation="False" />
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        Movil:
                    </td>
                    <td width="120">
                        <asp:TextBox ID="MovilTextBox" runat="server" Text='<%# Bind("Movil") %>' />
                    </td>
                    <td>
                        &nbsp;</td>
                    <td width="120">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td width="120">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td width="120">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
            <br />
        </EditItemTemplate>
        <EditRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
        <FooterStyle BackColor="White" ForeColor="#000066" />
        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
        <InsertItemTemplate>
            <table class="style1">
                <tr>
                    <td rowspan="9" width="120">
                        <img alt="Formulario" class="style3" 
                src="../../Images/1340872915_Application.png" />
                    </td>
                    <td>
                        Id :</td>
                    <td width="120">
                        <asp:TextBox ID="IdProveedorTextBox" runat="server" 
                            Text='<%# Bind("IdProveedor") %>' />
                    </td>
                    <td>
                        &nbsp;</td>
                    <td class="style4" width="120">
                        Ruc :</td>
                    <td colspan="2">
                        <asp:TextBox ID="RucTextBox" runat="server" Text='<%# Bind("Ruc") %>' />
                    </td>
                    <td colspan="2" rowspan="6">
                        <img alt="Proveedor" class="style5" 
                src="../../Images/1341126967_LorryGreen.png" />
                    </td>
                </tr>
                <tr>
                    <td colspan="6">
                        RazonSocial:</td>
                </tr>
                <tr>
                    <td colspan="6">
                        <asp:TextBox ID="RazonSocialTextBox" runat="server" 
                            Text='<%# Bind("RazonSocial") %>' Width="400px" />
                    </td>
                </tr>
                <tr>
                    <td colspan="6">
                        Direccion:</td>
                </tr>
                <tr>
                    <td colspan="6">
                        <asp:TextBox ID="DireccionTextBox" runat="server" 
                            Text='<%# Bind("Direccion") %>' Width="400px" />
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        Telefono:</td>
                    <td width="120">
                        <asp:TextBox ID="TelefonoTextBox" runat="server" 
                            Text='<%# Bind("Telefono") %>' />
                    </td>
                    <td colspan="2" style="text-align: right">
                        Contacto:</td>
                    <td colspan="2">
                        <asp:TextBox ID="PersonaContactoTextBox" runat="server" 
                            Text='<%# Bind("PersonaContacto") %>' />
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        Ciudad:</td>
                    <td width="120">
                        <asp:TextBox ID="CiudadTextBox" runat="server" Text='<%# Bind("Ciudad") %>' />
                    </td>
                    <td>
                        &nbsp;</td>
                    <td style="text-align: right" width="120">
                        Email:</td>
                    <td colspan="2">
                        <asp:TextBox ID="EmailTextBox" runat="server" 
                        Text='<%# Bind("Email") %>' />
                    </td>
                    <td rowspan="3" style="text-align: center">
                        <asp:ImageButton ID="ImageButton1" runat="server" CommandName="Insert" 
                            ImageUrl="~/Images/1340873474_Save.png" 
                            PostBackUrl="~/Compras/Proveedor/frmBuscarProveedor.aspx" />
                    </td>
                    <td rowspan="3">
                        <asp:ImageButton ID="ImageButton2" runat="server" 
                            ImageUrl="~/Images/1340873477_Delete.png" 
                            PostBackUrl="~/Compras/Proveedor/frmBuscarProveedor.aspx" />
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        Movil:
                    </td>
                    <td width="120">
                        <asp:TextBox ID="MovilTextBox" runat="server" 
                        Text='<%# Bind("Movil") %>' />
                    </td>
                    <td>
                        &nbsp;</td>
                    <td width="120">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td width="120">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td width="120">
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
        </InsertItemTemplate>
        <ItemTemplate>
            <table class="style1">
                <tr>
                    <td>
                        IdProveedor:</td>
                    <td>
                        <asp:TextBox ID="IdProveedorTextBox" runat="server" 
                            Text='<%# Bind("IdProveedor") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Ruc:</td>
                    <td>
                        <asp:TextBox ID="RucTextBox" runat="server" 
                        Text='<%# Bind("Ruc") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        RazonSocial:</td>
                    <td>
                        <asp:TextBox ID="RazonSocialTextBox" runat="server" 
                            Text='<%# Bind("RazonSocial") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Direccion:</td>
                    <td>
                        <asp:TextBox ID="DireccionTextBox" runat="server" 
                            Text='<%# Bind("Direccion") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Telefono:</td>
                    <td>
                        <asp:TextBox ID="TelefonoTextBox" runat="server" 
                            Text='<%# Bind("Telefono") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        PersonaContacto:</td>
                    <td>
                        <asp:TextBox ID="PersonaContactoTextBox" runat="server" 
                            Text='<%# Bind("PersonaContacto") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Ciudad:</td>
                    <td>
                        <asp:TextBox ID="CiudadTextBox" runat="server" 
                        Text='<%# Bind("Ciudad") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Email:</td>
                    <td>
                        <asp:TextBox ID="EmailTextBox" runat="server" 
                          Text='<%# Bind("Email") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        Movil:
                    </td>
                    <td>
                        <asp:TextBox ID="MovilTextBox" runat="server" 
                        Text='<%# Bind("Movil") %>' />
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" 
                            CommandName="Delete" Text="Eliminar" />
                        &nbsp;<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" 
                            CommandName="New" Text="Nuevo" />
                    </td>
                </tr>
            </table>
        </ItemTemplate>
        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
        <RowStyle ForeColor="#000066" />
    </asp:FormView>
    <asp:ObjectDataSource ID="odsProveedor" runat="server" 
        DataObjectTypeName="Farmacia.Entities.Proveedor" 
        DeleteMethod="DeleteProveedor" 
        InsertMethod="RegistrarProveedor" 
        SelectMethod="GetFromProveedorById" 
        TypeName="Farmacia.BussinessLogic.ProveedorBL" 
        onobjectcreating="odsProveedor_ObjectCreating" 
        UpdateMethod="RegistrarProveedor" 
        ondeleted="odsProveedor_Deleted" 
        oninserted="odsProveedor_Inserted" 
        onupdated="odsProveedor_Updated">
        <DeleteParameters>
            <asp:QueryStringParameter Name="id" QueryStringField="idProveedor" Type="Int32" />
        </DeleteParameters>
        <SelectParameters>
            <asp:QueryStringParameter Name="id" QueryStringField="idProveedor" 
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</fieldset>


</asp:Content>
